package org.example.controller;

import org.example.service.FamilyService;
import org.example.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.example.vo.ParentAndStudents;
import static org.example.interceptor.LoginInterceptor.threadLocal;
@Controller
@RequestMapping("/family")
public class FamilyController {
    @Autowired
    FamilyService familyService;
    @RequestMapping("/showFamily")
    public @ResponseBody R showFamily(){
        ParentAndStudents parentAndStudents = familyService.showFamily();
        return R.ok().setData(parentAndStudents);
    }
}
